All Questions
8 questions
0votes
1answer
188views
how can I detect if my infinite cp command has failed using bash
I have a little data collector, a Raspberry Pi Zero W, which, on boot, mounts a remote folder on mnt using sshfs. The data transfer is effected using a cp command, e.g., cp device file & where ...
1vote
3answers
1kviews
bash count files and directory, summary size and EXCLUDE folders that are fuse|sshfs
I need help for a bash script that counts files and folders in a specified directory on a Linux system (Debian), but I want to exclude a specified folder. I have a main directory named workdir with ...
0votes
2answers
616views
How to check in bash if a file is currently in use from a sshfs mount
I have a home server being used as a nas. The storage is mounted on my desktop via sshfs. What I would like to accomplish is to write a bash script which unmounts the nas and powers it down at a ...
1vote
0answers
2kviews
automatically reset sshfs when it locks up, remount fails unless done manually
i have 2 local dirs on my server mounted on a remote server. Local maintains connections with autossh -M 23 -R 24:localhost:22 user@server While remote mounts with dirs-sshfs.sh sshfs -o reconnect,...
2votes
1answer
977views
Bash Scripting: How to check for active sshfs mount in dir?
If currently have this code: 0130: moba(){ 0131: if [ -z "$(ls -A /home/me/Documents/A/B)" ]; then 0132: echo "Empty" 0133: sshfs me@domain:/home/C/D /home/me/Documents/A/B/ 0134: ...
2votes
1answer
2kviews
bash script problem when run from desktop launcher
I have a script which does the following: Connect via sshfs to a directory on a server Within that directory, there is an encrypted volume. Open it to the device mapper. Mount to a local directory (-...
4votes
1answer
2kviews
Automating sshfs not working
I want to mount a remote directory and I want to automate this. So I write below script which not working properly. #!/usr/bin/expect -f spawn sshfs [email protected]:/home/user /mnt/remote expect ...
5votes
2answers
2kviews
When using expect: SSHFS Transport endpoint is not connected
When I run my SSHFS connection script from bash, everything works perfectly. However, when I run the same script using the expect utility, I get the following error when I try to access the folder ...